<?php defined('InShopNC') or exit('Access Invalid!');?>
<link href="<?php echo SHOP_TEMPLATES_URL;?>/css/main.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="<?php echo SHOP_RESOURCE_SITE_URL;?>/js/home_index.js" charset="utf-8"></script>
<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/waypoints.js"></script>
<style type="text/css">
.category { display: block !important; }
.public-nav-layout{border-bottom:none !important;}
.public-nav-layout .all-category .title{ padding-bottom:8px;}
</style>
<div class="clear"></div>
<div class="homePage">
<!-- HomeFocusLayout Begin-->
<div class="home-focus-layout"><?php echo $output['web_html']['index_pic'];?></div>
<!--HomeFocusLayout End-->
<!--HomeDefBz Begin-->
<div class="wrapper">
		<div class="wrapper02">
			<ul>
				<li style="margin-right: 4px;">
					<a>
						<img src="<?php echo SHOP_TEMPLATES_URL;?>/images/xianshi_head.jpg">
					</a>
				</li>
				<?php $i=0; foreach($output['xianshi_item'] as $val) { ?>
				<li<?php if($i==(count($output['xianshi_item'])-1)){echo ' style="margin-right: 0px;"';}?>><a href="<?php echo urlShop('goods','index',array('goods_id'=> $val['goods_id']));?>"><img src="<?php echo UPLOAD_SITE_URL.DS.ATTACH_GOODS.DS.$val['goods_image'];?>" width="242" height="145"></a></li>
				<?php $i++; }?>
			</ul>
		</div>
</div>
<div class="clear"></div>
<!--HomeDefBz End-->
	<div>
		<div class="wrapper">
			<p style="border-bottom:1px solid #EEEEEE; font-size:24px; line-height:45px; margin-top:15px; margin-bottom:10px; ">品牌特卖</p>
			<ul class="pinpaitemai">
				<?php
				$i = 0;
				foreach($output['brands_list'] as $brand){ if(empty($brand['promotion']['brand_image'])||empty($brand['promotion']['brand_logo']))continue; ?>
				<li<?php if($i==(count($output['brands_list'])-1)){echo ' style="margin-right: 0px;"';}?>><a href="<?php echo $brand['promotion']['brand_url'];?>"><img src="<?php echo UPLOAD_SITE_URL.DS.ATTACH_BRAND.DS. $brand['promotion']['brand_image'];?>" width="293" height="160" /></a><p><?php echo $brand['promotion']['brand_title'];?> <label style="float:right;"><?php echo html_entity_decode($brand['promotion']['brand_tip']);?></label></p></li>
			<?php $i++; } ?>
			</ul>
		</div>
	</div>
<!--HomeDefRob Begin-->

<div class="clear"></div>
<!--HomeDefBrand End-->
	<!--StandardLayout Begin-->
	<?php echo $output['web_html']['index'];?>
	<!--StandardLayout End-->
<script language="JavaScript">
	var banner1 = '<?php echo BASE_SITE_URL.DS.DIR_UPLOAD.DS.ATTACH_ADV.DS.$output['adv_list'][0]['adv_image'];?>';
	var href1 = '<?php echo $output['adv_list'][0]['adv_url'];?>';
$('<div class="title"><div class="pic-type"><a href="'+href1+'" target="_blank"><img style="margin-bottom: 10px;" src="'+banner1+'" ></a></div></div>').insertBefore($('.style-red .title'));

</script>
<!--HomeDefPro Begin-->
<?php if(!empty($output['goods_list']) && is_array($output['goods_list'])){?>
<div class="wrapper presale_list" >
	<?php if(!empty($output['adv_list'][1]['adv_image'])){
	   echo '<div class="title" style="margin-top: 10px;margin-bottom: -40px;"><div class="pic-type"><a href="'.$output['adv_list'][1]['adv_url'].'" target="_blank"><img src="'.BASE_SITE_URL.DS.DIR_UPLOAD.DS.ATTACH_ADV.DS.$output['adv_list'][1]['adv_image'].'" ></a></div></div>';
	  }?>
	<div class="home-def-tip tip_4">热门爆款</div>
	<ul class="home-def-pro">
		<?php $i=1;foreach($output['goods_list'] as $value){?>
		<li<?php if( $i % 4 == 1){ echo ' class="nor"';}?>>
			<a href="<?php echo urlShop('goods','index',array('goods_id'=>$value['goods_id']));?>" target="_blank" title="<?php echo $value['goods_name'];?>"><img src="<?php echo cthumb($value['goods_image'], 240,$value['store_id']);?>" /></a>
			<div class="pro_info">
				<div class="pro_name"><a href="<?php echo urlShop('goods','index',array('goods_id'=>$value['goods_id']));?>" target="_blank" title="<?php echo $value['goods_name'];?>"><?php echo str_cut($value['goods_name'],60);?></a></div>
				<div class="pro_str">即将揭晓...</div>
			</div>
		</li>
		<?php $i++;} ?>
	</ul>
</div>
<div class="clear"></div>
<?php } ?>
<!--HomeDefAd End-->


<!--Nav_box Begin-->

<div id="nav_box">
	<ul>
		<li class="nav_Sd_1 hover">
			<a class="num" href="javascript:;">1F</a>
			<a class="word" href="javascript:;">黄金馆</a>
		</li>
		<li class="nav_Sd_2">
			<a class="num" href="javascript:;">2F</a>
			<a class="word" href="javascript:;">白银馆</a>
		</li>
		<li class="nav_Sd_3">
			<a class="num" href="javascript:;">3F</a>
			<a class="word" href="javascript:;">铂金馆</a>
		</li>
		<li class="nav_Sd_4">
			<a class="num" href="javascript:;">4F</a>
			<a class="word" href="javascript:;">珠宝馆</a>
		</li>
	</ul>
</div>

<!--Nav_box End-->
<div class="clear"></div>
<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/jquery.raty/jquery.raty.min.js"></script>
<script language="JavaScript">
	$(function(){
		$('.raty').raty({
			path: "<?php echo RESOURCE_SITE_URL;?>/js/jquery.raty/img",
			readOnly: true,
			score: function() {
				return $(this).attr('data-score');
			}
		});
	});

	/* 加入购物车后的效果函数 */
	function addcart_callback(data){
		$('#bold_num').html(data.num);
		$('#bold_mly').html(price_format(data.amount));
		$('.ncs-cart-popup').fadeIn('fast');
	}

</script>